package com.sokal.easycare.modules.sys.dao;

import org.apache.ibatis.annotations.Param;

import com.sokal.easycare.common.persistence.CrudDao;
import com.sokal.easycare.common.persistence.annotation.MyBatisDao;
import com.sokal.easycare.modules.sys.entity.UserAuthToken;

@MyBatisDao
public interface UserAuthTokenDao extends CrudDao<UserAuthToken> {

	UserAuthToken findUserByTokenAndSeries(@Param("token")String token,  @Param("series")String series);

	void deleteByTokenAndSeries(@Param("token")String token, @Param("series")String series);
	
	
	void deleteByUserId(@Param("userId")String userId);

	void deleteExpiredTokens();

}
